package com.home.qh.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.home.qh.dao.CountryDao;
import com.home.qh.model.Country;
import com.home.qh.service.CountryManager;

/**
 * Implementation of RoleManager interface.
 *
 * @author <a href="mailto:dan@getrolling.com">Dan Kibler</a>
 */
@Service("countryManager")
public class CountryManagerImpl extends GenericManagerImpl<Country, Long> implements CountryManager {
	CountryDao countryDao;

    @Autowired
    public CountryManagerImpl(CountryDao countryDao) {
        super(countryDao);
        this.countryDao = countryDao;
    }

	public List<Country> getCountryByCodeAndName(String countryCode,
			String countryName) {
		return countryDao.getCountryByCodeAndName(countryCode, countryName);
	}

	public List<Country> getCountryByCountry(Country country, String sort, boolean desc, int startResult, int maxResults) {
		return countryDao.getCountryByCountry(country, sort, desc, startResult, maxResults);
	}

}